package cn.org.xuanguang.kepler.hormos.rdb.plugin;

import cn.org.xuanguang.kepler.hormos.rdb.dsl.param.TermType;

public class TermTypeUtils {
    /**
     * termType 转成 sql
     *
     * @param termType
     * @return
     */
    public static String getTermType(String termType) {
        switch (termType) {
            case TermType.eq:
                return "=";
            case TermType.nempty:
                return "<>";
            case TermType.lt:
                return ">";
            case TermType.lte:
                return ">=";
            case TermType.gt:
                return "<";
            case TermType.gte:
                return "<=";
            case TermType.like:
                return "LIKE";
//            notlike
            case TermType.nlike:
                return "NOT LIKE";
            case TermType.in:
                return "IN";
        }
        return "=";
    }

}
